// 应聘信息管理

import {request} from './request'


//应聘记录-列表-带聊天
export function ListApply(params){
    return request({
        // url:`/api/boss/apply/list/?page=param.page&per_page=param.per_page`,
        url:'/api/boss/apply/list',
        params
    })

}

//应聘记录更新-更新备注
export function RenewApply(data,id){
    return request({
        url:`/api/boss/apply/update/${id}`,
        method:'PUT',
        data
    })
}

//thread message list 聊天列表
export function ThreadApply(id){
    return request({
        url:`/api/boss/thread/room_messages/${id}`
    })
}

//thread message store 发送聊天信息
export function SendApply(data,id){
    return request({
        url:`/api/boss/thread/room_messages/${id}`,
        method:'POST',
        data
    })
}


// 应聘结果通过
export function ResultApply(id){
    return request({
        url:`/api/boss/apply/result_pass/${id}`,
        method:'PUT'
    })
}

// 应聘结果未通过
export function FailApply(id){
    return request({
        url:`/api/boss/apply/result_fail/${id}`,
        method:'PUT'
    })
}

//应聘记录-下载简历
export function DownloadApply(id){
    return request({
        url:`/api/boss/apply/download/${id}`,
        method:'POST'
    })
}
//删除记录信息
export function deleteApply(id){
    return request({
       url: `/api/boss/apply/deleteApply/${id}`,
        method: 'DELETE',
    })
}
